<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
    <title>ushop on facebook</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    
    <link href="{$DIR_WS_CATALOG}facebook/facebook.css" type="text/css" rel="Stylesheet" />
</head>
<body>
{section name=p_fb loop=$result_fb}
    {if $result_fb[p_fb].fb_enable eq '1'}
        {section name=p loop=$result}
            <div class="product">
                <div class="product-thumb">
                    <img src="{$DIR_WS_CATALOG}images/{$result[p].proImage}" />
                </div>
                <div class="product-tit">
                    <a href="{$DIR_WS_CATALOG}product_info.php?products_id={$result[p].proID}">
                        {$result[p].proName}
                    </a>
                </div>
                <div class="product-price">
                    {$result[p].proPrice}               
                </div>            
                <div class="product-des">
                    {$result[p].proDes}
                </div>
                <div class="facebook-fan">
                    <fb:like href="{$DIR_WS_CATALOG}product_info.php?products_id={$result[p].proID}"></fb:like>
                </div>
                <div class="facebook-share">
                    <fb:share-button class="url" type="button_count" href="{$DIR_WS_CATALOG}product_info.php?products_id={$result[p].proID}"></fb:share-button>
                </div>                     
            </div>    
        {/section}
    {else}
        <div>Tính năng ushop trên Facebook chưa được kích hoạt</div>
    {/if}

<!-- Cai dat XFBML -->
<div id="fb-root"></div>
<script>
{literal}
  window.fbAsyncInit = function() {
    FB.init({appId: '{/literal}{$result_fb[p_fb].api}{literal}', status: true, cookie: true,
             xfbml: true});
  };
  (function() {
    var e = document.createElement('script'); e.async = true;
    e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
    document.getElementById('fb-root').appendChild(e);
  }());
{/literal}
</script>
<!-- Ket thuc cai dat XFBML -->

{/section}
</body>
</html>